From: Giovanni Campagna Date: Thu, 13 Jun 2013 19:48:32 +0000 (+0200) Subject: Background: don't require a URI scheme for picture-uri X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~4031 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=798a0ca240b90d557f42c76d8d9b14c73b1038e1;p=gnome-shell.git Background: don't require a URI scheme for picture-uri Migration from old settings can result in a path instead of URI there. This is technically invalid, but can easily recognize it and avoid the crash. Minor changes by Ray Strode https://bugzilla.gnome.org/show_bug.cgi?id=702121 --- diff --git a/js/ui/background.js b/js/ui/background.js index 0e9c3aa95..1d9ab7c21 100644 --- a/js/ui/background.js +++ b/js/ui/background.js @@ -571,7 +571,16 @@ const Background = new Lang.Class({ } let uri = this._settings.get_string(PICTURE_URI_KEY); - let filename = Gio.File.new_for_uri(uri).get_path(); + let filename; + if (GLib.uri_parse_scheme(uri) != null) + filename = Gio.File.new_for_uri(uri).get_path(); + else + filename = uri; + + if (!filename) { + this._setLoaded(); + return; + } this._loadFile(filename); },